package com.findmeastore.dao.impl;



import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.HibernateTemplate;

import com.findmeastore.bo.StateBo;
import com.findmeastore.dao.IMasterStateDAO;

public class MasterStateDAOImpl implements IMasterStateDAO{

	private HibernateTemplate hibernateTemplate;
	
	public void setSessionFactory(SessionFactory sessionFactory){
		this.hibernateTemplate = new HibernateTemplate(sessionFactory);
	}
	
	@SuppressWarnings("unchecked")
	public List<StateBo> getAllStates() {
		return hibernateTemplate.find("from MasterState");
	}

}
